﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ContactManager.Models;
using System.Web.Mvc;
using ContactManager.Models.Entities;

namespace ContactManager.Controllers
{
    public class ContactFormViewModel
    {
       // private readonly IContactManagerService _service;
        // Properties
        public Contact Contact { get; private set; }
        public SelectList MyGroups { get; private set; }

        // Constructor
        public ContactFormViewModel(Contact contact,IContactManagerService _service)
        {
            Contact = contact;
            MyGroups = new SelectList(_service.ListGroups(),"Id","Name");
            
        }
    }

}

        
    
